home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / QuickDraw™ GX v1.0ß2 / Interfaces & Libraries / interfaces / graphics toolbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-29  |  3.3 KB  |  82 lines  |  [TEXT/MPS ]

  1. /* graphics:
  2.     toolbox interfaces
  3.     by Cary Clark, Georgiann Delaney, Michael Fairman, Dave Good, Robert Johnson, Keith McGreggor, Oliver Steele, David Van Brink, Chris Yerga
  4.     Copyright 1987 - 1991 Apple Computer, Inc.  All rights reserved.    */
  5.  
  6.  
  7. #ifndef graphicsToolboxIncludes
  8.     #define graphicsToolboxIncludes
  9.  
  10.     #ifndef __WINDOWS__
  11.         #include <Windows.h>
  12.     #endif
  13.  
  14.     #ifndef fontTypesIncludes
  15.         #include "font types.h"
  16.     #endif
  17.  
  18.     #ifndef graphicsTypesIncludes
  19.         #include "graphics types.h"
  20.     #endif
  21.  
  22.      #ifdef appleInternal
  23.         #define GXInlineCode(x)
  24.     #endif
  25.     #ifndef GXInlineCode
  26.         #define GXInlineCode(x)    = {0x303C, x, 0xA832}
  27.     #endif
  28.  
  29.     typedef void (*gxUserViewPortFilter)(gxShape toFilter, gxViewPort portOrder, long refCon);
  30.  
  31.     gxViewPort GXNewWindowViewPort(WindowPtr qdWindow) GXInlineCode(0x11FA);
  32.     gxViewPort GXGetWindowViewPort(WindowPtr qdWindow) GXInlineCode(0x11FB);
  33.     WindowPtr GXGetViewPortWindow(gxViewPort portOrder) GXInlineCode(0x11FC);
  34.  
  35.     GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice) GXInlineCode(0x11FD);
  36.      gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice) GXInlineCode(0x11FE);
  37.  
  38.     /* gxPoint utilities */
  39.     void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt) GXInlineCode(0x1200);
  40.  
  41.      /* mouse utilities */
  42.      void GXGetGlobalMouse(gxPoint *globalPt) GXInlineCode(0x1201);                    /* return mouse location in fixed-gxPoint global space */
  43.     void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt) GXInlineCode(0x1202);        /* return fixed-gxPoint local mouse (gxViewPort == 0 --> default) */
  44.  
  45.     /* QuickDraw PICT utilities (NOTE: InitGraf must must be called before using these routines) */
  46.      PicHandle GXShapeToPICT(gxShape source) GXInlineCode(0x1203);            /* given a gxShape, return a handle to a QuickDraw PICT */
  47.      gxShape GXPICTToShape(PicHandle qdPicture) GXInlineCode(0x1204);            /* vice-versa */
  48.  
  49.     gxUserViewPortFilter GXGetViewPortFilter(gxViewPort portOrder, long *refCon) GXInlineCode(0x1206);
  50.     void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilter filter, long refCon) GXInlineCode(0x1207);
  51.  
  52.      /* QD to QD GX Translator typedefs and functions */
  53.     
  54.     #define gxDefaultOptionsTranslation        0x0000
  55.     #define gxOptimizedTranslation             0x0001
  56.     #define gxReplaceLineWidthTranslation         0x0002
  57.     #define gxSimpleScalingTranslation         0x0004
  58.     #define gxSimpleGeometryTranslation         0x0008    /* implies simple scaling */
  59.     #define gxSimpleLinesTranslation            0x000C    /* implies simple geometry & scaling */
  60.     #define gxLayoutTextTranslation             0x0010    /* turn on gxLine layout (normally off) */
  61.     
  62.     typedef long gxTranslationOptions;
  63.     
  64.     #define    gxContainsFormsBegin         0x0001
  65.     #define    gxContainsFormsEnd         0x0002
  66.     #define    gxContainsPostScript         0x0004
  67.     #define    gxContainsEmptyPostScript     0x0008
  68.     
  69.     typedef OSErr (*gxShapeSpoolFunction)(gxShape toSpool, long refCon);
  70.     
  71.     typedef long gxTranslatorStatistics;
  72.  
  73.     void GXInstallQDTranslator(GrafPtr port, gxTranslationOptions options, const Rect *srcRect, const Rect *dstRect, Point patStrech, gxShapeSpoolFunction userFunction, long refCon) GXInlineCode(0x1269);
  74.  
  75.     gxTranslatorStatistics *GXRemoveQDTranslator(GrafPtr port, gxTranslatorStatistics *statistics) GXInlineCode(0x126A);
  76.  
  77.     gxShape GXConvertPICTToShape(const PicHandle pict, gxTranslationOptions options, const Rect *srcRect, const Rect *dstRect, Point patStretch, gxShape destination, gxTranslatorStatistics stats) GXInlineCode(0x126B);
  78.  
  79.     #undef GXInlineCode
  80.  
  81. #endif
  82.